<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="Fearn.css"  />
<title>Clan Wars</title>
</head>

<body>


    
    <div id="banner">
    
    	<table class="nav">
        	<tbody>
            	<tr>
                	<td><a href="index.php">home</a></td>
                </tr>
                <tr>
                    <td><a href="wars.php">Wars</a></td>
                </tr>
                <tr>
                    <td><a href="members.php">Members</a></td>
                </tr>
                <tr>
                    <td><a href="about.php">About us</a></td>
                </tr>
                <tr>
                    <td><a href="stuff.php">Stuff</a></td>
                </tr>
            </tbody>
        </table>
                  
    
    
    </div>

<div id="container">

    
	<div id="content">
	<center>Wars</center>
    <a class="cwer" href="wars.php">Less info on wars</a>
    
    <center>
    <span class="cwer">
    
    <?php
$con = mysql_connect("localhost","Fear","Fearn");
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }

mysql_select_db("wars", $con);

$result = mysql_query("SELECT * FROM cwer,clan,map WHERE cwer.map_id = map.map_id AND cwer.clan_id = clan.clan_id");

echo "<table border='1'>
<tr>
<th>war #</th>
<th>date</th>
<th>vs</th>
<th>score map 1</th>
<th>score map 2</th>
<th>overall score</th>
<th>result</th>
</tr>";

while($row = mysql_fetch_array($result))
  {
  echo "<tr>";
  echo "<td>" . $row['cw_id'] . "</td>";
  echo "<td>" . $row['date'] . "</td>";
  echo "<td>" . $row['clan'] . "</td>";
  echo "<td>" . $row['score1'] . "</td>";
  echo "<td>" . $row['score2'] . "</td>";
  echo "<td>" . $row['score'] . "</td>";
  echo "<td>" . $row['win']; echo $row['loss']; echo $row['tie']. "</td>";
  
  echo "</tr>";
  }
echo "</table>";

mysql_close($con);
?>
    </span>
    </center>
    
	</div>
    <div id="login">
    
    </div>
    
</div>



</body>
</html>
